Skip to content

Conversation

@osfameron
Copy link
Contributor

Code links are hard to see because they look like code, and not like links. We override a code to reset the link formatting for this case.

Code links are hard to see because they look like code, and not like links.
We override `a code` to reset the link formatting for this case.
@osfameron
Copy link
Contributor Author

@osfameron
Copy link
Contributor Author

Copy link
Contributor

@sarahlwelton sarahlwelton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this causes no collisions when the text is bolded, too. Think it's straightforward, honestly don't think there's any issues.

Copy link
Contributor

@RichardSmedley RichardSmedley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

@ElliotFrancisHunter ElliotFrancisHunter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, yes one thousand times yes!! 👍🏼 ❤️

Copy link
Contributor

@simon-dew simon-dew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an example of this specific use case 👇 in the preview?


a code {
color: var(--color-link);
background-color: transparent;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, so what does it look like if you have a longer run of inline code and only some of it is a link? Does the link lose its background even though the rest of the code has a shaded background?

<code>I'm code! <a href="example.com">And I'm a link!</a> But I am not!</code>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did check this for e.g. code listings with links, possibly locally (I think there is an example in Server docs I'll try to dig up).

That wasn't a problem because, as in your snippet above, it's code a whereas the CSS only applies to a code 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah what I'm thinking of is probably an edge case. This PR fixes the immediate problem. LGTM

@osfameron osfameron merged commit 8642f41 into master Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants